import Vue from 'vue'
import App from './App'
// const url = window.location.href;

Vue.config.productionTip = false

App.mpType = 'app'

uni.request({
	url: './static/config.json',
	success(res) {
		console.log(res)
		const { data } = res
		window._appConfig = data
		const app = new Vue({
		    ...App
		})
		app.$mount()
	}
})


// 时间戳
function timestamp() {
    return 't='+new Date().getTime()+''+Math.floor(Math.random()*9999+1000);
}
//在URL上设置时间戳
function setUrlStamp(url)
{
    url = url.replace(/(^\s*)|(\s*$)/g,'');
    if(url.indexOf("t=") == -1)
    {
        if(url.indexOf("?") != -1)
        {
            url = url+"&"+timestamp();
        }else
        {
            url = url+"?"+timestamp();
        }
    }
    return url;
}
 



